//
//  WXLiveTextView.h
//  TestTextView
//
//  Created by tianlong on 2019/3/27.
//  Copyright © 2019年 tianlong. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@class WXLiveTextView;
@protocol WXLiveTextViewDelegate <NSObject>
@optional
- (void)live_textView:(WXLiveTextView *)textView currentText:(NSString *)text viewHeight:(CGFloat)viewHeight;
- (BOOL)live_textViewShouldBeginEditing:(WXLiveTextView *)textView;
- (void)live_textViewDidBeginEditing:(WXLiveTextView *)textView;
- (BOOL)live_textViewShouldEndEditing:(WXLiveTextView *)textView;
- (void)live_textViewDidEndEditing:(WXLiveTextView *)textView;
- (BOOL)live_textView:(WXLiveTextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
@end

@interface WXLiveTextView : UIView
@property (copy,   nonatomic, readonly) NSString *text;
@property (copy,   nonatomic) NSString *placeholder;
@property (strong, nonatomic) UIFont *textFont;
@property (strong, nonatomic) UIColor *textColor;
@property (strong, nonatomic) UIColor *placeholderTextColor;
@property (weak,   nonatomic) id delegate;
@end

NS_ASSUME_NONNULL_END
